package com.adfframeworks.labs.dao.impl;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.adfframeworks.labs.domain.Community;

public class CommunityMapper implements RowMapper {

	@Override
	public Community mapRow(ResultSet rs, int rowNum) throws SQLException {
		Community community = new Community();
		community.setId(rs.getInt("Community_ID"));
		community.setName(rs.getString("Name"));
		community.setOwner(rs.getInt("Owner"));
		community.setKeyword(rs.getString("KeyWord"));
		community.setVisibility(rs.getInt("Visibility"));
		return community;
	}
}